//
//  MyZhuoXinLSViewController.m
//
//
//  Created by mac on 15/1/11.
//  Copyright (c) 2015年 mac. All rights reserved.
//

#import "SNSetViewController.h"
#import "MyZhuoXinLSViewController.h"
#import "MyZhuoXinButton.h"
#import "ManageViewController.h"
#import "MyLoanTableViewController.h"
#import "ZuZhiViewController.h"
#import "HeZhuoSheViewController.h"
#import "MyDataTableViewController.h"
#import "MyLoanTableViewController.h"

@interface MyZhuoXinLSViewController ()

@end

@implementation MyZhuoXinLSViewController


- (IBAction)adminBtnClick:(UIButton *)sender {
    //跳到用户信息
    MyDataTableViewController *MC = [[MyDataTableViewController alloc]init];
    
    [self.navigationController pushViewController:MC animated:YES];
    
}

- (IBAction)organizeBtnClick:(MyZhuoXinButton *)sender {
    if ([[[NSUserDefaults standardUserDefaults] objectForKey:@"userType"] isEqualToString:@"6"]) {
        ZuZhiViewController *zzvc = [[ZuZhiViewController alloc]init];
        [self.navigationController pushViewController:zzvc animated:YES];
    }else if([[[NSUserDefaults standardUserDefaults] objectForKey:@"userType"] isEqualToString:@"7"]){
        HeZhuoSheViewController *sylbVC = [[HeZhuoSheViewController alloc]init];
        [self.navigationController pushViewController:sylbVC animated:YES];
    }
}


/**
 生产计划
 @param sender 生产计划
 */
- (IBAction)productPlanClick:(id)sender {
    
    MyLoanTableViewController *MC = [[MyLoanTableViewController alloc]init];
    
    //    DecisionMakerListViewController *viewController = [[DecisionMakerListViewController alloc] initWithNibName:@"DecisionMakerListViewController" bundle:nil];
    [self.navigationController pushViewController:MC animated:YES];
}

- (IBAction)fundBtnClick:(MyZhuoXinButton *)sender {
    ManageViewController *MC = [[ManageViewController alloc]init];
    MC.title = @"农资管理";
    MC.manageId = sender.tag;
    
    [self.navigationController pushViewController:MC animated:YES];
}
- (IBAction)technologyBtnClick:(MyZhuoXinButton *)sender {
    ManageViewController *MC = [[ManageViewController alloc]init];
    MC.manageId = sender.tag;
    MC.title = @"农技管理";
    
    [self.navigationController pushViewController:MC animated:YES];
}
- (IBAction)MachineBtnClick:(MyZhuoXinButton *)sender {
    ManageViewController *MC = [[ManageViewController alloc]init];
    MC.title = @"农机管理";
    
    MC.manageId = sender.tag;
    
    [self.navigationController pushViewController:MC animated:YES];
}




- (void)viewDidLoad
{
    [super viewDidLoad];
    
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithImage:[UIImage imageNamed:@"设置"] style:UIBarButtonItemStyleDone target:self action:@selector(rightBtnClcik)];
    self.navigationController.navigationBar.backgroundColor = [UIColor clearColor];
    
    
    self.navigationItem.title = @"我的卓信";
    //    self.tabBarController.title = @"我的卓信";
    
    [self initViews];
}

- (void)initViews
{
    
}


-(void)rightBtnClcik{
    
    //    UIViewController *setSb = [[UIStoryboard storyboardWithName:@"ZXSetTableViewController" bundle:nil] instantiateInitialViewController];
    UIViewController * setSb = [[SNSetViewController alloc] init];
    //
    [self.navigationController pushViewController:setSb animated:YES];
    
}


- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
